#ifndef CENTRAL_HH
#define CENTRAL_HH

#include "annuaire.h"
#include<map>
#include<pthread.h>
#include <sys/types.h>
#include <sys/wait.h>

class Central {

private:
	map<int, bool> PortsCommunication;
	Central();
	static Central *single;
	static void * thServeur(void * args);
	static void * thFils(void * args);

	pthread_t client;
	pthread_t serveur;

public:
	static Central* getInstance();
	//Destructeur
	virtual ~Central();

	//Serices
	static void * envoyerAuClient(void *arg);
	static void * envoyerAuServeur(void *arg);
	int etablir_connexion();
	void liberer_connexion(int numero_port);	

};
#endif
